<div class="actions" style="width: 400px;">
    <?php echo $this->Html->link(__(LANG_COUPONCREATE), array('action' => 'coupon_created'))?>
    <?php echo $this->Html->link(__(LANG_COUPONLIST), array('action' => 'coupon_list'))?>
</div>

<style type="text/css">
    .title {
        font-size: 13px;
        width: 120px;
        font-weight: bold;
    }
    .sub_title {
        font-size: 12px;
        width: 80px;
        font-weight: bold;
    }
    .input_font {
        font-size: 11px;
        width: 100px;
        height: 20px;
    }
    .size_width {
        width: 500px;
    }
    .not-border-bottom{
        border: 0;
        text-align: right;
    }
</style>

<table class="size_width">
    <?php echo $this->Form->create('coupon_created', array('onsubmit' => 'return confirm('.'"'.__(LANG_COUPON_CREATECONFIRM).'");')); ?>
    <tr>
        <td class="title"><?=__(LANG_COUPON_NUM)?></td>
        <td class="input_font" colspan="3">
            <?php echo $this->Form->input('coupon_num', array(
                'label' => false,
                'type' => 'text',
                'value' => empty($data['coupon_num']) ? 1 : $data['coupon_num'],
            )); ?>
        </td>
    </tr>
    <tr>
        <td class="title"><?=__(LANG_COUPON_STARTTIME)?></td>
        <td class="input_font" colspan="3">
            <?php echo $this->Form->input('start_time', array(
                'label' => false,
                'id'=>'start_time',
                'placeholder' => __('ex) 2014-11-31 00:00:00'),
                'type' => 'text',
                'value' => empty($data['start_time']) ? '' : $data['start_time'],
            )); ?>
        </td>
    </tr>
    <tr>
        <td class="title"><?=__(LANG_COUPON_ENDTIME)?></td>
        <td class="input_font" colspan="3">
            <?php echo $this->Form->input('end_time', array(
                'label' => false,
                'id'=>'end_time',
                'placeholder' => __('ex) 2015-12-31 00:00:00'),
                'type' => 'text',
                'value' => empty($data['end_time']) ? '' : $data['end_time'],
            )); ?>
        </td>
    </tr>
    <tr>
        <td class="title"><?=__(LANG_COUPON_EVENTTYPE)?></td>
        <td class="input_font" colspan="3">
            <?php echo $this->Form->input('agent', array(
                'label' => false,
                'type' => 'text',
                'placeholder' => __(LANG_COUPON_EVNETTYPE_EX),
                'value' => empty($data['agent']) ? '' : $data['agent'],
            )); ?>
        </td>
    </tr>
    <tr>
        <td class="title"><?=__(LANG_COUPON_USERNUM)?></td>
        <td class="input_font" colspan="3">
            <?php echo $this->Form->input('use_limit', array(
                'label' => false,
                'type' => 'text',
                'value' => empty($data['use_limit']) ? 1 : $data['use_limit'],
            )); ?>
        </td>
    </tr>
    <tr>
        <td class="title"><?=__(LANG_COUPON_REWARD)?> 1</td>
        <td class="sub_title"><?php echo '골드';?></td>
        <td class="input_font" colspan="2">
            <?php echo $this->Form->input('reward_gold', array(
                'label' => false,
                'type' => 'text',
                'value' => empty($data['reward_gold']) ? '' : $data['reward_gold'],
            ));?>
        </td>
    </tr>
    <tr>
        <td class="title"><?=__(LANG_COUPON_REWARD)?> 2</td>
        <td class="sub_title"><?php echo '크리스탈';?></td>
        <td class="input_font" colspan="2">
            <?php echo $this->Form->input('reward_crystal', array(
                'label' => false,
                'type' => 'text',
                'value' => empty($data['reward_crystal']) ? '' : $data['reward_crystal'],
            ));?>
        </td>
    </tr>
    <tr>
        <td class="title"><?=__(LANG_COUPON_REWARD)?> 3</td>
        <td class="sub_title"><?php echo '우정포인트';?></td>
        <td class="input_font" colspan="2">
            <?php echo $this->Form->input('reward_friend', array(
                'label' => false,
                'type' => 'text',
                'value' => empty($data['reward_friend']) ? '' : $data['reward_friend'],
            ));?>
        </td>
    </tr>
    <tr>
        <td class="title"><?=__(LANG_COUPON_REWARD)?> 4</td>
        <td class="sub_title"><?php echo '스태미나';?></td>
        <td class="input_font" colspan="2">
            <?php echo $this->Form->input('reward_stamina', array(
                'label' => false,
                'type' => 'text',
                'value' => empty($data['reward_stamina']) ? '' : $data['reward_stamina'],
            ));?>
        </td>
    </tr>
    <tr>
        <td class="title"><?=__(LANG_COUPON_REWARD)?> 5</td>
        <td class="sub_title"><?php echo '물약';?></td>
        <td class="input_font" colspan="2">
            <?php echo $this->Form->input('reward_potion', array(
                'label' => false,
                'type' => 'text',
                'value' => empty($data['reward_potion']) ? '' : $data['reward_potion'],
            ));?>
        </td>
    </tr>

    <tr>
        <td class="title"><?=__(LANG_COUPON_REWARD)?> 6</td>
        <td class="sub_title"><?php echo '재료1';?></td>
        <td class="input_font">
            <?php echo $this->Form->input('reward_material_1', array(
                'label' => false,
                'type' => 'select',
                'options' => $ticketId,
                'value' => empty($data['reward_material_1']) ? '' : $data['reward_material_1'],
            ));?>
        </td>
        <td class="sub_title"><?php echo '수량';?></td>
        <td class="input_font">
            <?php echo $this->Form->input('reward_material_count_1', array(
                'label' => false,
                'type' => 'text',
                'value' => empty($data['reward_material_count_1']) ? '' : $data['reward_material_count_1'],
            ));?>
        </td>
    </tr>

    <tr>
            <td class="title"><?=__(LANG_COUPON_REWARD)?> 6</td>
            <td class="sub_title"><?php echo '재료2';?></td>
            <td class="input_font">
                <?php echo $this->Form->input('reward_material_2', array(
                    'label' => false,
                    'type' => 'select',
                    'options' => $ticketId,
                    'value' => empty($data['reward_material_2']) ? '' : $data['reward_material_2'],
                ));?>
            </td>
            <td class="sub_title"><?php echo '수량';?></td>
            <td class="input_font">
                <?php echo $this->Form->input('reward_material_count_2', array(
                    'label' => false,
                    'type' => 'text',
                    'value' => empty($data['reward_material_count_2']) ? '' : $data['reward_material_count_2'],
                ));?>
            </td>
        </tr>

        <tr>
                <td class="title"><?=__(LANG_COUPON_REWARD)?> 6</td>
                <td class="sub_title"><?php echo '재료3';?></td>
                <td class="input_font">
                    <?php echo $this->Form->input('reward_material_3', array(
                        'label' => false,
                        'type' => 'select',
                        'options' => $ticketId,
                        'value' => empty($data['reward_material_3']) ? '' : $data['reward_material_3'],
                    ));?>
                </td>
                <td class="sub_title"><?php echo '수량';?></td>
                <td class="input_font">
                    <?php echo $this->Form->input('reward_material_count_3', array(
                        'label' => false,
                        'type' => 'text',
                        'value' => empty($data['reward_material_count_3']) ? '' : $data['reward_material_count_3'],
                    ));?>
                </td>
            </tr>

    <tr>
            <td class="title"><?=__(LANG_COUPON_REWARD)?> 7</td>
            <td class="sub_title"><?php echo 'costume';?></td>
            <td class="input_font">
                <?php echo $this->Form->input('reward_costume', array(
                    'label' => false,
                    'type' => 'select',
                    'options' => $costumeId,
                    'value' => empty($data['reward_costume']) ? '' : $data['reward_costume'],
                ));?>
            </td>
            <td class="sub_title"><?php echo '지속시간(시간)';?></td>
            <td class="input_font">
                <?php echo $this->Form->input('reward_costume_expiretime', array(
                    'label' => false,
                    'type' => 'text',
                    'value' => empty($data['reward_costume_expiretime']) ? '' : $data['reward_costume_expiretime'],
                ));?>
            </td>
    </tr>
<tr>
        <td class="not-border-bottom" colspan="4">
            <?php echo $this->Form->end(__(LANG_COUPON_CREATE_BTN)); ?>
        </td>
    </tr>
</table>

<?php echo $this->Session->flash('good') ?>
<?php echo $this->Session->flash('bad') ?>